
package gene.core.util;

import gene.core.util.Vector2;
import gene.core.util.Sprite;
import gene.core.Core;
import gene.core.Component;
import gene.core.Scene;

/**
 *
 * @author callagun
 */
public abstract class Layer extends Component {
 /*
 * id
 * tileset id
 * tile size
 * array.W
 * array.size
 * array
 *
 */
    public  static byte []     layer_tileset;
    public  static Sprite       tileset;
    public  static int         _tileW = 16;
    public  static int         _tileH = 16;
    public  static Camera      camera ;
    
    
    public Layer(Scene screen, byte [][] tileset,int mapW, Sprite tiles,
            int tileW, int tileH) {
        super(screen);
        _tileH = tileH;
        _tileW = tileW;

        int mapH = tileset.length/mapW;
        int i=0;
        for(int x =0 ; x++ < mapW;){
            for(int y=0;y++ < mapH;){
               layer_tileset [i] = tileset[x][y];
               i++;
            }
        }
    }

    public abstract void draw();

    private static void paint(byte [] tiles){ }
    
    public abstract int collidsWithSlope(Component c);

}